package com.cyloer.abstractory.controller;

import com.cyloer.abstractory.base.AbstractConnect;
import com.cyloer.abstractory.base.ConnectFactory;
import com.cyloer.abstractory.impl.MysqlConnectImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @author: xiangliu5
 * @date: 2020/10/28 22:28
 */

@RestController("test")
public class testController {

    @GetMapping(value = "get/{c}")
    public String test(@PathVariable("c") String c) {
        AbstractConnect abstractConnect = new ConnectFactory();
        MysqlConnectImpl mysqlConnect = abstractConnect.getConnect(MysqlConnectImpl.class);
        return mysqlConnect.connect();
    }

}
